package com.allwees.data.analysis.cart.api;

import com.allwees.bs.core.modelbase.vo.R;
import com.allwees.data.analysis.base.api.BaseAnalysisApi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 *
 *
 * @author yangylsky
 * @since 2020-04-07
 *
 */
@RestController
@RequestMapping("/data/api/analysis/cart")
public class CartApi extends BaseAnalysisApi {
    @GetMapping("/add_cart_user")
    public R addCartUser(Date dateFrom, Date dateTo) {
        return R.ok(query("cart/ADD_CART_USER.txt", dateFrom, dateTo));
    }

    @GetMapping("/add_cart_sku")
    public R addCartSku(Date dateFrom, Date dateTo) {
        return R.ok(query("cart/ADD_CART_SKU.txt", dateFrom, dateTo));
    }

    @GetMapping("/add_cart_spu")
    public R addCartSpu(Date dateFrom, Date dateTo) {
        return R.ok(query("cart/ADD_CART_SPU.txt", dateFrom, dateTo));
    }

    @GetMapping("/add_cart_amt")
    public R addCartAmt(Date dateFrom, Date dateTo) {
        return R.ok(query("cart/ADD_CART_AMT.txt", dateFrom, dateTo));
    }

    @GetMapping("/add_cart_detail")
    public R addCartDetail(Date dateFrom, Date dateTo) {
        return R.ok(query("cart/ADD_CART_DETAIL.txt", dateFrom, dateTo));
    }
}
